<?php $this->load->view(TEMPLATE_NAME.'/front/header'); ?>
<?php $this->load->view(TEMPLATE_NAME.'/front/login_left'); ?>
<link media="screen" rel="stylesheet" type="text/css" src="<?php echo site_url('/js/colorbox'); ?>/colorbox.css"/>
<link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>fancybox/jquery.fancybox-1.3.1.css" media="screen" />
<!--<script type="text/javascript" src="<?php echo site_url('/js/colorbox'); ?>/jquery.colorbox-min.js"></script>-->
<script type="text/javascript" src="<?php echo base_url(); ?>fancybox/jquery.fancybox-1.3.1.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>fancybox/jquery.mousewheel-3.0.2.pack.js"></script>

<script type="text/javascript" src="<?php echo site_url('js'); ?>/jquery.lightbox-0.5.min.js"></script>
<link rel="stylesheet" type="text/css" href="<?php echo site_url('xhtml/css/lightbox');?>/jquery.lightbox-0.5.css" media="screen" />

 <script type="text/javascript">
 
    $(document).ready(function(){

	
	    $('#gallery a').lightBox({	    
	    	imageLoading: '<?php echo site_url('xhtml/css/lightbox');?>/lightbox-ico-loading.gif',
   	    	imageBtnClose: '<?php echo site_url('xhtml/css/lightbox');?>/lightbox-btn-close.gif',
    		imageBtnPrev: '<?php echo site_url('xhtml/css/lightbox');?>/lightbox-btn-prev.gif',
    		imageBtnNext: '<?php echo site_url('xhtml/css/lightbox');?>/lightbox-btn-next.gif',
        	imageBlank:	'<?php echo site_url('xhtml/css/lightbox');?>/lightbox-blank.gif',		
    		
            ResizeSpeed: 350
    	
   		});
	
        $("#various1").fancybox({
            'width'         : 500,
            'height'        : 390,  
            'autoScale'     : false,
            'autoDimensions': false
        });                    
        $(".fancyboxed1").fancybox({
            'autoScale'     : true,
            'autoDimensions': true
        });  

    });

    </script>
<style type="text/css" > 

#inline1 {           
    width:500px;
    height:390px;
    display:block;
}

.featured-image {
    /*background:none repeat scroll 0 0 #FFFFFF;*/
    display:table;
    height:160px;
    margin:0 0px;
    overflow:hidden;
    position:relative;
    text-align:center;
    width:160px;
}
.image-middle {
    display:table-cell;
    vertical-align:middle;
    width:100%;
}
.image-inner {
   /* position:relative;*/
    top:-50%;
    width:160px;
    height:160px;
    text-align:left;
}
.image-inner img {
    max-width:160px;
    max-height:160px;
}

</style>
<!--body content starts-->
<div class="page">

<div class="prevnext">
<a class="prev" href="<?php echo site_url('directory').$url?>">&laquo; Back to list</a>
<a class="next" href="<?php echo site_url('directory')?>">New Lookup</a>
</div><!-- prevnext -->
<div class="clear"></div>
<hr />

<div class="img" style="width:220px;">
    <div class="featured-image">
        <div class="image-middle">
            <div class="image-inner">
            	<?php if((!empty($company_detail['company_logo'])) && (file_exists( "./uploads/directory/company_logo/thumb/".$company_detail['company_logo']))){?>
            	<a href="<?php echo site_url('directory')."/".$company_detail['company_slug_name']?>">                
                <img src="<?php echo base_url()?>uploads/directory/company_logo/thumb/<?php echo $company_detail['company_logo'] ?>">
                </a>
                <?php }else{?>
                <a href="<?php echo site_url('directory/'.$value['company_slug_name'].$url); ?>">
                 <img src="<?php echo site_url().'xhtml/img/ads_silver.jpg' ?>" width="160px" />
              </a>	
                 <?php }?>
            </div>
        </div>
    </div><br />
    <p class="f14">
    <span class='purple'>Name: </span><?php echo $company_detail['company'];?><br/>
    <?php echo ($company_detail['province_name']? "<span class='purple'>City:</span> ".$company_detail['province_name']."<br />":'')?>
    <?php echo ($company_detail['city_name']? "<span class='purple'>Town:</span> ".$company_detail['city_name']."<br />":'')?>
  <?php echo ($company_detail['company_contact_number']? "<span class='purple'>Tel:</span> ".$company_detail['company_contact_number']."<br />":'')?>
  <?php echo ($company_detail['mobile_number']? "<span class='purple'>Mobile no:</span> ".$company_detail['mobile_number']."<br />":'')?>
  <?php echo ($company_detail['company_contact_email']? "<span class='purple'>Email:</span> ".$company_detail['company_contact_email']."<br />":'')?>
   <?php echo ($company_detail['company_website']? "<span class='purple'>Website:</span> ".$company_detail['company_website']."<br />":'')?>
  <?php echo ($company_detail['fax_number']? "<span class='purple'>fax:</span> ".$company_detail['fax_number']:'')?>
       
</p>
</div><!-- img -->


<p style="text-align: justify;"><?php echo $company_detail['company_description']; ?></p>

<div class="clear"></div>
<hr />
<?php if(!empty($photos_list)){ ?>
<?php $photos_count = count($photos_list); ?>

<div class="thumb" id="gallery">
<?php
foreach($photos_list as $key=>$value){
if($value['image']!= "" && (file_exists("./uploads/directory/photo/thumb/".$value['image']))){?>
<div <?php /*?>class="protofolio_image"<?php */?> style="width: 76px; height:76px;overflow:hidden;display:inline-block; margin:0 9px 3px 0; float:left;">
<a <?php /*?>class="fancyboxed"<?php */?> title="<?php echo $value['caption']?>" href="<?php echo base_url().'uploads/directory/photo/preview/'.$value['image'] ?>">
<img src="<?php echo base_url().'uploads/directory/photo/thumb/'.$value['image'] ?>" width="76" height="76" style="width: inherit !important; height: inherit !important;" />
</a>
</div>
<?php }
} ?>
</div><!-- thumb -->
<?php } ?>
<div class="clear" ></div>
 <div class="img" style="font-size:19px;">
 Weight
  </div><!-- img -->
  <div class="afimg">
  <p><?php echo $company_detail['weight'];?> lbs</p>
  </div>
 <div class="clear" ></div>
  <div class="img" style="font-size:19px;">
 Height
  </div><!-- img -->
  <div class="afimg">
  <p><?php echo $company_detail['height'];?> </p>
  </div>
 <div class="clear" ></div>
  <div class="img" style="font-size:19px;">
 Age
  </div><!-- img -->
  <div class="afimg">
  <p><?php echo $company_detail['age'];?> yrs</p>
  </div>
 <div class="clear" ></div>
<?php if(!empty($services_list_comp)){ ?>
<hr />
  <div class="img" style="font-size:19px;">
  Gender
  </div><!-- img -->
  <div class="afimg">
  <p>
    <?php foreach($services_list_comp as $rows): ?>
    <?php if($rows->services == "Gender"){?>
      <?php echo $rows->name; ?><br>
    <?php }endforeach; ?>
  </p>
  </div><!-- afimg -->
  <div class="clear"></div>
  <div class="img" style="font-size:19px;">
  Category
  </div><!-- img -->
  <div class="afimg">
  <p>
    <?php foreach($services_list_comp as $rows): ?>
    <?php if($rows->services == "Category"){?>
      <?php echo $rows->name; ?><br>
    <?php }endforeach; ?>
  </p>
  </div><!-- afimg -->
  <div class="clear"></div>
  <div class="img" style="font-size:19px;">
 Hair Color
  </div><!-- img -->
  <div class="afimg">
  <p>
    <?php foreach($services_list_comp as $rows): ?>
    <?php if($rows->services == "Hair Color"){?>
      <?php echo $rows->name; ?><br>
    <?php }endforeach; ?>
  </p>
  </div><!-- afimg -->
  <div class="clear"></div>
  <div class="img" style="font-size:19px;">
  Ethnicity
  </div><!-- img -->
  <div class="afimg">
  <p>
    <?php foreach($services_list_comp as $rows): ?>
    <?php if($rows->services == "Ethnicity"){?>
      <?php echo $rows->name; ?><br>
    <?php }endforeach; ?>
  </p>
  </div><!-- afimg -->

<?php } ?>
  <div class="clear"></div>
  <hr>
<div class="clear"></div>
<?php if($send_mail != ''){?>
        <!--for sucess message-->
        <?php if (@$messageBox != ''):?>
        <br/>
        <div class="formbox" id="message-box" style="padding:0;">
        <p class="f17" style="padding:7px;">Send E-mail</p>
        <div style="color:red; background-color:#CF118C; text-align:center; font-size:13px; color:#FFF; padding:7px; margin:0 0 7px 0; display:block;">
            <?php //echo $messageBox?><strong>Successfull</strong> - you e-mail has been sent to this company. A copy has <br /> been e-mail to you as well with their full contact details. If you would like<br /> to send another e-mail - <a href=""><strong style="color:#FFF;">click here</strong></a>
        </div>
        </div>
        <?php endif;?>
        <!--/success message-->
        
<?php }else{?>

<?php echo form_open('directory/'.$company_detail['company_slug_name']); ?>


<div class="formbox" id="message-box">
<div class="height10_10"></div>

<div class="left1">
<p class="f17">Send E-mail</p>

<div class="height10_10"></div>
<p class="f14_normal"  style="font-weight:normal; color:#CCC;">Send an e-mail now by simply filling in this form.</p>
</div>
<div class="right1">
    <div style="display: none;"><input type="checkbox" name="headoffice" value="1" checked="checked" /></div>
    <?php /*?><div style="border:1px solid #ccc;padding:2px;margin-bottom: 2px;font-weight: bolder;margin-right:10px; margin-bottom:3px"> Head Office - <?php echo $company_detail['city_name'].', '.$company_detail['province_name'];?></div>
    <?php
    if (!empty($branchList)):
        foreach($branchList as $branch):?>
            <div style="border:1px solid #ccc;padding:2px;margin-bottom: 2px;font-weight: bolder;margin-right:10px; margin-bottom:3px"><input type="checkbox" name="branchoffice[]" value="<?php echo $branch['id']?>" checked="checked" /> Branch - <?php echo $branch['city_name'].', '.$branch['province_name'];?></div>
    <?php endforeach;
    endif;*/?> 

<label>Message: <span class="norm purple">(Required)</span></label><br>
<?php echo form_textarea('message',$form_message); ?>
<?php echo form_error('message','<div id="error_recaptcha" class="alert" style="margin: 0px 0px 4px"><strong>Error:</strong>','</div>') ?>
<div class="clear"></div>	
<label>Your Name: <span class="norm purple">(Required)</span></label><br>
<?php echo form_input('name',$form_name); ?>
<?php echo form_error('name','<div id="error_recaptcha" class="alert" style="margin: 0px 0px 4px"><strong>Error:</strong>','</div>') ?>
<br/>
<label>E-mail address: <span class="norm purple">(Required)</span></label><br>
<?php echo form_input('email',$form_email); ?>
<?php echo form_error('email','<div id="error_recaptcha" class="alert" style="margin: 0px 0px 4px"><strong>Error:</strong>','</div>') ?>
<br/>
<label>Telephone Number: <span class="norm purple">(Required)</span></label><br>
<?php echo form_input('telephone',$form_telephone); ?>
<?php echo form_error('telephone','<div id="error_recaptcha" class="alert" style="margin: 0px 0px 4px"><strong>Error:</strong>','</div>') ?>
</div>
<div class="clear"></div>
</div><!-- formbox -->
<div class="formbox">
<div class="left1">
<p class="f17">Spam Blocker</p>
<div class="height10_10"></div>
<p class="f14_normal" style="font-weight:normal; color:#CCC;">Enter the letters you see in the block above in the space below. </p>
</div>
<div class="right1">
<?php if(!empty($recaptcha)){ ?>
<?php echo $recaptcha; ?>
<?php echo form_error('recaptcha_response_field','<div class="alert" style="margin: 0px 0px 4px"><strong>Error:</strong>','</div>');
}?>
</div>
<div class="clear"></div>
</div><!-- formbox -->
<hr />
<div style=" display: inline-block; margin-left: 141px;">
<?php 
$form_button = array(
  'type'=>'submit',
  'name'=>'submit',
  'value'=>'submit',
  'content'=>'Submit'
);
echo form_button($form_button) ?></div>
<hr />
<?php echo form_close(); ?>
<?php }?>
	<?php /*?><p class="f15 purple"><strong>Want to advertise in this directory?</strong> <a href="<?php echo site_url('advertise'); ?>" target="_blank">Please click here to find out how.</a></p><?php */?>

<div style="height:0px;overflow:hidden;">                         
    <div id="inline1">
        <div id="map_canvas2" style="width:500px;height:390px;"></div>
    </div>   
</div>
</div>

<?php $this->load->view(TEMPLATE_NAME.'/front/side_right'); ?>
<?php $this->load->view(TEMPLATE_NAME.'/front/footer'); ?>

